import 'package:flutter/material.dart';
import 'package:syria_sports/core/app_export.dart';

class MyDrawerButton extends StatelessWidget {
  final String title;
  final Function onTapped;
  final IconData? icon;
  final String? iconPath;
  const MyDrawerButton({super.key, required this.title, required this.onTapped, this.icon, this.iconPath});

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: (){
        onTapped.call();
      },
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Row(
          children: [
            if(icon!=null)
             Icon(icon, color:Colors.orange,size: 38,),

            const SizedBox(width: 4),
            Text(title,style: theme.textTheme.titleMedium,),
          ],
        ),
      ),
    );
  }
}
